home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-03-18 | 2.8 KB | 49 lines | [TEXT/MJUA] |
- MACRO 'TimeDependent';
-
- {this macro assumes that you selected VAR1 as time dependent covariate
- and VAR2 as fixed covariate.Notice that rVar[] addresses to data in
- the selected vars array while rData[] addresses to the data in the
- active data array loaded with the Get Data option of the File Menu.
- If the value of the variable in columm 2 of the data matrix is less
- than 650 the selected VAR1 takes the value of zero (0);otherwise its
- value is substracted from the average value for that variable. This
- latter operation should be done for both, time dependent and fixed
- covariate, to avoid internal overflow errors.}
- NOTICE that the index in the rVar[] token is the order of selection
- of the variable NOT the column number of that variable in the global
- data array (rData[]).
- This macro MUST be inserted in the Macros Menu before performing a
- Time Dependent analysis. Otherwise you'll get an error message}
-
-
- begin
-
- {rVar[1] is selected as time dependent covariate (age at diagnosis)
- survival times are in column 2 of the global data array (rData[2])
- If survival times are equal or greater that 650 days, age takes its
- value otherwise is set to zero. This is the general rule to follow
- with time dependent analysis}
-
- FUNCTION
- If rData[2] >= 650 then rVar[1]:= (rVar[1] - rMean[1]) else rVar[1]:= 0;
- rVar[2]:= (rVar[2] - rMean[2]); {Fixed covariate = grade}
- end;
- end;
-
- {This is the same but with a different approach. Lets suppose you selected
- Vars in columns 3,5 and 7 from your database as time dependent covariates
- The order they are located in the selected variables array (rVar[])
- are as follows: 1 for Var 3; 2 for Var 5; and 3 for Var 7
-
- FUNCTION (we invoque the FUNCTION macro command) Then we start by setting all time dependent variables to zero:
- rVar[1] := 0; rVar[2] := 0; rVar[3]:= 0;
- Now we make the following conditional test
- if rData[2] >=650 then (is the condition met at each failure time ?) begin
- rVar[1]:= rData[3] - rMean[1];
- rVar[2]:= rData[5] - rMean[2];
- rVar[3]:= rData[7] - rMean[3];
- end;
- NOTICE that we substract the value of the variable from its average
- value (rMean[]) to avoid owerflow problems.
- END; (end of FUNCTION macro command) }
- IF YOU UNDERSTAND THIS YOU'RE READY TO PERFORM TIME DEPENDENT ANALYSIS }